package com.jiazhong.springmvc.test01;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Auther:shuXin
 */
@RequestMapping("json")
@Controller
@ResponseBody
public class JsonPersonController {

    @PostMapping("data")
    public String data(@RequestBody Person person){
        System.out.println(person);
        return person.toString();
    }
}
